import request from './request.js';
let service = request.service;
let download = request.download;
export default {
    addUpDateCustomerInfo(type,data) {
        /**新增修改客户信息列表 */
        return service({
            url: `/adscm/operation/aftersales/shCustomerInfo/${type}`,
            method: 'post',
            data
        })
    },
    customerInfoList(data) {
         /**获取客户信息列表 */
         return service({
             url: `/adscm/operation/aftersales/shCustomerInfo/selectAll`,
             method: 'post',
             data
         })
    },
    deleteCustomerInfo(id){
        /**删除客户信息列表 */
        return service({
            url: `/adscm/operation/aftersales/shCustomerInfo/delete/${id}`,
            method: 'post'
        })
    },
    machineAll(data) {
        /**根据客户信息id获取关联机器列表 */
        return service({
            url: `/adscm/operation/aftersales/shMachine/selectAll`,
            method: 'post',
            data
        })
    },
    addUpdateMachine(type,data){
         /**根据客户信息id新增或修改关联机器列表 */
         return service({
             url: `/adscm/operation/aftersales/shMachine/${type}`,
             method: 'post',
             data
         })
    },
    deleteMachine(id) {
         /**删除关联机器 */
         return service({
             url: `/adscm/operation/aftersales/shMachine/delete/${id}`,
             method: 'post'
         })
    },
    addUpdateHotel(type, data) {
        /**根据客户信息id新增或修改关联旅舍信息 */
        return service({
            url: `/adscm/operation/aftersales/shHotelInfo/${type}`,
            method: 'post',
            data
        })
    },
    hotelInfoList(pid) {
         /**根据客户信息id获取关联旅舍列表 */
         return service({
             url: `/adscm/operation/aftersales/shHotelInfo/selectByPid/${pid}`,
             method: 'post'
         })
    },
    deleteHotel(id) {
         /**删除关联旅舍 */
        return service({
            url: `/adscm/operation/aftersales/shHotelInfo/delete/${id}`,
            method: 'post'
        })
    },
    selfRepairList(pid) {
         /**根据客户信息id获取自修人员列表 */
         return service({
             url: `/adscm/operation/aftersales/shSelfRepair/selectByPid/${pid}`,
             method: 'post'
         })
    },
    addUpdateSelfRepair(type, data) {
         /**根据客户信息id新增或修改自修人员信息 */
         return service({
             url: `/adscm/operation/aftersales/shSelfRepair/${type}`,
             method: 'post',
             data
         })
    },
    deleteSelfRepair(id){
         /**删除自修人员 */
        return service({
            url: `/adscm/operation/aftersales/shSelfRepair/delete/${id}`,
            method: 'post'
        })
    },
    stationPhotoList(pid) {
      /**根据客户信息id获取浆站图片列表 */
      return service({
          url: `/adscm/operation/aftersales/shStationPhoto/selectByPid/${pid}`,
          method: 'post'
      })
    },
    addStationPhoto(data){
        /**根据客户信息id新增浆站照片信息 */
        return service({
            url: `/adscm/operation/aftersales/shStationPhoto/insert`,
            method: 'post',
            data
        })
    },
    deleteStationPhoto(id){
        /**删除浆站信息 */
        return service({
            url: `/adscm/operation/aftersales/shStationPhoto/delete/${id}`,
            method: 'post',
        })
    },
    afterSaleMaterialTask(data) {
        /**售后原料库任务*/
        return service({
            url: `/adscm/operation/aftersales/shylMaterial/selectshylMaterial`,
            method: 'post',
            data
        })
    },
    shDepositRecord(tid) {
        /**出库记录 */
         return service({
             url: `/adscm/operation/aftersales/shylMaterialdetail/selectByTid/${tid}`,
             method: 'post'
         })
    },

    addShSpacePartsTask(data){
        /**新增备件库任务 */
        return service({
            url: `/adscm/operation/aftersales/shSpaceParts/insert`,
            method: 'post',
            data
        })
    },
    shSpacePartsTaskList(data){
        /**备件库任务列表 */
        return service({
            url: `/adscm/operation/aftersales/shSpaceParts/select`,
            method: 'post',
            data
        })
    },
    allPartsList(){
         /**获取所有部件 */
         return service({
             url: `/adscm/operation/aftersales/shSpaceParts/selectParts`,
             method: 'post'
         })
    },
    deleteSpaceParts(id) {
         /**删除备件 */
         return service({
             url: `/adscm/operation/aftersales/shSpaceParts/delete/${id}`,
             method: 'post'
         })
    },
    addOutStock(data){
        /**新增出库信息列表 */
        return service({
            url: `/adscm/operation/aftersales/shSpacePartsDetail/insert`,
            method: 'post',
            data
        })
    },
    outStockList(pid) {
        /**出库信息列表 */
        return service({
            url: `/adscm/operation/aftersales/shSpacePartsDetail/selectByPid/${pid}`,
            method: 'post'
        })
    },
    allShCustomerInfo(data){
        /**搜索查询浆站*/
        return service({
            url: `/adscm/operation/aftersales/shCustomerInfo/select`,
            method: 'get',
            params:data
        })
    },
   machineListBgCid(cid) {
       /**根据浆站id查询管理机器*/
       return service({
           url: `/adscm/operation/aftersales/shMachine/selectByCid/${cid}`,
           method: 'post'
       })
   },
   addUpdateShRepair(type,data) {
       /**新增修改维修任务*/
       return service({
           url: `/adscm/operation/aftersales/shRepair/${type}`,
           method: 'post',
           data
       })
   },
   shRepairTaskList(data){
        /**维修任务列表*/
        return service({
            url: `/adscm/operation/aftersales/shRepair/select`,
            method: 'post',
            data
        })
   },
   allRepairPersons(){
          /**维修人员列表*/
       return service({
           url: `/adscm/operation/aftersales/shRepair/selectRepairPersons`,
           method: 'post'
       })
   },
   allMachineType(){
       /**获取机器所有类型 */
       return service({
           url: `/adscm/operation/jqbzSettings/selectJyDrawType`,
           method: 'post'
       })
   },
   allBjList(){
       /**获取所有部件 */
        return service({
            url: `/adscm/operation/jqbzSettings/select`,
            method: 'post'
        })
   },
   repairConfigList(pid) {
       /**获取维修配置列表 */
       return service({
           url: `/adscm/operation/aftersales/shRepairSettingProecss/selectByPid/${pid}`,
           method: 'post'
       })
   },
   addUpdateRepairConfig(type,data){
        /**新增或修改维修配置 */
        return service({
            url: `/adscm/operation/aftersales/shRepairSettingProecss/${type}`,
            method: 'post',
            data
        })
   },
   addShRepairMaterial(data){
    /**添加售后维修原料 */
    return service({
        url: `/adscm/operation/aftersales/shRepairMaterialList/insert`,
        method: 'post',
        data
    })
   },
    shRepairMaterialList(pid) {
         /**售后维修原料列表 */
         return service({
             url: `/adscm/operation/aftersales/shRepairMaterialList/selectBypid/${pid}`,
             method: 'post'
         })
    },
    searchMaterialStock(data) {
       /**售后维修原料列表 */
       return service({
           url: `/adscm/operation/aftersales/shylMaterial/selectInStock`,
           method: 'get',
           params:data
       })
    },
    deleteShRepairMaterial(id){
        /**删除维修原料 */
        return service({
            url: `/adscm/operation/aftersales/shRepairMaterialList/delete/${id}`,
            method: 'post'
        })
    },
    shRepairMaterialListCheck(pid) {
        /**获取维修物料检验项 */
        return service({
            url: `/adscm/operation/aftersales/shRepairMaterialListCheck/selectByPid/${pid}`,
            method: 'post'
        })
    },
    updateShRepairMaterialCheck(data){
         /**编辑维修物料检验 */
         return service({
             url: `/adscm/operation/aftersales/shRepairMaterialListCheck/update`,
             method: 'post',
             data
         })
    },
    assemblyList(pid) {
         /**维修物料检验过程记录列表 */
         return service({
             url: `/adscm/operation/aftersales/shRepairProecss/selectByPid/${pid}`,
             method: 'post'
         })
    },
    updateAssembly(data){
        /**维修物料检验过程记录修改 */
        return service({
            url: `/adscm/operation/aftersales/shRepairProecss/update`,
            method: 'post',
            data
        })
    },
    addUpdateShFailureSetting(type,data){
        /**新增/修改售后故障位置设置  */
        return service({
            url: `/adscm/operation/aftersales/shSettingParts/${type}`,
            method: 'post',
            data
        })
    },
    shFailureSettingList(data) {
         /**售后故障位置设置列表  */
         return service({
             url: `/adscm/operation/aftersales/shSettingParts/selectAll`,
             method: 'post',
             data
         })
    },
    shPhenomenonList(pid) {
          /**售后故障现象设置列表  */
          return service({
              url: `/adscm/operation/aftersales/shSettingPhenomenon/selectbyPid/${pid}`,
              method: 'post'
          })
    },
    addUpdateShPhenomenon(type,data){
         /**新增/修改售后故障现象设置  */
         return service({
             url: `/adscm/operation/aftersales/shSettingPhenomenon/${type}`,
             method: 'post',
             data
         })
    },
    addUpdateShProblem(type,data){
        /**新增/修改 售后故障现象对应的问题  */
        return service({
            url: `/adscm/operation/aftersales/shSettingProblem/${type}`,
            method: 'post',
            data
        })
    },
    shProblemList(pid) {
        /**售后故障现象对应的问题列表 */
        return service({
            url: `/adscm/operation/aftersales/shSettingProblem/selectByPid/${pid}`,
            method: 'post'
        })
    },
    addMaintenance(type,data) {
        /**售后维修与保养-发放任务 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeep/${type}`,
            method: 'post',
            data
        })
    },
    maintenanceList(data) {
        /**售后维修与保养-任务列表 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeep/select`,
            method: 'post',
            data
        })
    },
    shRepairUpkeepPersonsAll(){
        /**维修人列表 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeep/selectShRepairUpkeepPersons`,
            method: 'post'
        })
    },
    maintenanceMaterialList(pid) {
        /**售后维修与保养 -获取物料列表 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeepMaterialList/selectBypid/${pid}`,
            method: 'post'
        })
    },
    maintenanceAddMaterial(data){
        /**售后维修与保养 -领取物料 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeepMaterialList/insert`,
            method: 'post',
            data
        })
    },
    maintenanceDeleteMaterial(id) {
        /**售后维修与保养 -删除物料 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeepMaterialList/delete/${id}`,
            method: 'post'
        })
    },
    maintenancePartsList(pid) {
        /**售后维修与保养 -获取部件列表 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeepPartsMaterialList/selectByPid/${pid}`,
            method: 'post'
        })
    },
    maintenanceAddParts(data) {
        /**售后维修与保养 -领取部件 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeepPartsMaterialList/insert`,
            method: 'post',
            data
        })
    },
    maintenanceDeleteParts(id) {
        /**售后维修与保养 -删除物料列表 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeepPartsMaterialList/delete/${id}`,
            method: 'post'
        })
    },
    shSpacePartsAll(){
        /**获取所有部件 */
        return service({
            url: `/adscm/operation/aftersales/shSpaceParts/selectSpace`,
            method: 'post'
        })
    },
    maintenanceAddRemoveParts(data) {
        /**售后维修与保养 -新增换下部件 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeepRepairPartsMaterialList/insert`,
            method: 'post',
            data
        })
    },
    maintenanceRemovePartsList(pid) {
        /**售后维修与保养 -获取换下部件列表 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeepRepairPartsMaterialList/selectByPid/${pid}`,
            method: 'post'
        })
    },
    maintenanceDeleteRemoveParts(id) {
        /**售后维修与保养 -删除换下部件 */
        return service({
            url: `/adscm/operation/aftersales/shRepairUpkeepRepairPartsMaterialList/delete/${id}`,
            method: 'post'
        })
    },
    selectJqbzParts() {
        /**获取所有部装所有部件*/
        return service({
            url: `/adscm/operation/jqbzSettings/select`,
            method: 'post'
        })
    },
    insertApp(data){
        /**新增app*/
        return service({
            url: `/adscm/operation/aftersales/shAppVersion/insert`,
            method: 'post',
            data
        })
    },
    appList(data){
        /**app列表*/
        return service({
            url: `/adscm/operation/aftersales/shAppVersion/select`,
            method: 'post',
            data
        })
    }

}
